var dialog = {
    error:function(mes){
      layer.alert(mes,{
        title:'警告',
        icon:2
      });
    },
    success:function(mes,url){
      layer.msg(mes,{
        title:'成功提示',
        icon:1,
        time: 0,
        btn:['确定'],
        yes:function(){
          location.href=url;
        }
      });
    },
    confirm:function(mes,action){
      layer.confirm(mes, {
        btn: ['确定','取消'], //按钮
        yes:function(){
          action();
        }
      });
    }



}
